<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户管理')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-userinfo-edit" th:object="${userinfo}">
        <input name="userid" th:field="*{userid}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">用户名：</label>
            <div class="col-sm-8">
                <input name="username" th:field="*{username}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">密码：</label>
            <div class="col-sm-8">
                <input name="password" th:field="*{password}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">手机号：</label>
            <div class="col-sm-8">
                <input name="mobile" th:field="*{mobile}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">性别：</label>
            <div class="col-sm-8">
                <div class="radio-box">
                    <input id="xh_gender_nan" name="sex" type="radio" th:field="*{sex}" value="1">
                    <label for="xh_gender_nan">男</label>
                </div>
                <div class="radio-box">
                    <input id="xh_gender_nv" name="sex" type="radio" th:field="*{sex}" value="0">
                    <label for="xh_gender_nv">女</label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否激活：</label>
            <div class="col-sm-8">
                <div class="radio-box">
                    <input id="xh_isActive_yes" name="isActive" th:field="*{isActive}" type="radio" value="1">
                    <label for="xh_isActive_yes">激活</label>
                </div>
                <div class="radio-box">
                    <input id="xh_isActive_no" name="isActive" th:field="*{isActive}" type="radio" value="0">
                    <label for="xh_isActive_no">冻结</label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否是会员：</label>
            <div class="col-sm-8">
                <div class="radio-box">
                    <input id="xh_isVip_yes" name="isVip" th:field="*{isVip}" type="radio" value="1">
                    <label for="xh_isVip_yes">会员</label>
                </div>
                <div class="radio-box">
                    <input id="xh_isVip_no" name="isVip" th:field="*{isVip}" type="radio" value="0">
                    <label for="xh_isVip_no">普通用户</label>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "messagebook/userinfo";
    $("#form-userinfo-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-userinfo-edit').serialize());
        }
    }
</script>
</body>
</html>